package com.ftg.learn.framework.spring.chapter04.local.annotation;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 布衣
 */
public class Play {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.scan("com.ftg.learn.framework.spring.chapter04.local.annotation");
        context.register(ProductType.class);
        context.refresh();

        Product product = context.getBean("product", Product.class);
        System.out.println(product.getProductType());
    }

}
